﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics.Contracts;

namespace YasharEl.Infrastructure.ExceptionHandling
{
    public static class ExceptionUtility
    {
        private const string HandlingInstanceToken = "{handlingInstanceID}";

        public static string FormatExceptionMessage(string message, Guid handlingInstanceId)
        {
            Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(message), "message could not be null or empty.");
            return message.Replace(HandlingInstanceToken, handlingInstanceId.ToString());
        }
    }
}
